package com.sky.wsp.warning.vo;

import cn.hutool.core.util.StrUtil;

import java.util.Date;

/**
 * @author wangshaopeng@talkweb.com.cn
 * @desccription 在此输入描述
 * @date 2023/7/3
 */
public class Event {
    /**
     * 日志时间
     */
    private Date date;
    /**
     * 告警音频
     */
    private String audio;
    /**
     * 告警内容
     */
    private String content;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getAudio() {
        return audio;
    }

    public void setAudio(String audio) {
        this.audio = audio;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public int hashCode() {
        if (null == audio) {
            return 0;
        }
        return audio.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (null == obj) {
            return false;
        }
        if (obj instanceof Event) {
            Event e = (Event) obj;
            return StrUtil.equals(audio, e.getAudio());
        }
        return false;
    }

    @Override
    public String toString() {
        return "Event{" +
                "date=" + date +
                ", audio='" + audio + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
